Skip to content

fix(new): command to npm link to angular-cli #778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2016
Merged

fix(new): command to npm link to angular-cli #778

merged 2 commits into from
May 19, 2016

Conversation

monojack
Copy link
Contributor

add --link-cli command to link newly generated project to the global angular-cli
package. reduces ng new ... command time with about 50%

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@monojack
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@monojack
Copy link
Contributor Author

Yea, it was me and I approve with this commit

@monodnb
Copy link

monodnb commented May 16, 2016

It's me, I'm the same person, I approve with the commits

ui.writeLine(chalk.green('Successfully linked to angular-cli.'));
})
.catch(function (/*error*/) {
ui.writeLine(chalk.red(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It all fits in one line, like the chalk.green above.

@hansl
Copy link
Contributor

hansl commented May 17, 2016

Last comment:

In the Can change current working directory to 'test-project' test could you use this option instead of what we're currently doing (which is the same thing but manually).

add `--link-cli` command to link newly generated project to the global `angular-cli`
package. reduces `ng new ...` command time with about 50%
@hansl hansl changed the title perf(ng new): command to link to angular-cli fix(new): command to npm link to angular-cli May 17, 2016
@hansl
Copy link
Contributor

hansl commented May 17, 2016

Can you rebase? I'll merge this when it's ready (or rebase myself later today).

@monojack
Copy link
Contributor Author

I was away, sorry.
It's done, Rebased, ready for merge. Cheers!

@filipesilva filipesilva merged commit 9b8334f into angular:master May 19, 2016
@monojack monojack deleted the link-cli branch May 19, 2016 18:14
@aecz
Copy link
Contributor

aecz commented Sep 20, 2016

Looks like the npm link is done after the npm install which defeats the purpose as it does not reduce install time nor size of node_modules. @filipesilva @monojack @monodnb Please review.

As a workaround, i use:

ng new --link-cli --skip-npm myproject
cd myproject
npm install

Woud love to have it in one command. Thanks.

@kylecordes
Copy link

With from @aecz 's process, link-cli is a large improvement in project setup time. Might it be worthwhile to make that process the default you get with "ng new"? In other words, make the fast path default, and the slow (but more correct, from a version-locking point of view) optional? It seems this really improves the CLI user experience. (Currently running ng-new is pretty fast on my Macbook, not so fast on most of Windows machines.)

@monojack
Copy link
Contributor Author

Made a new pull request to address this
#2250

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants